import 'package:flutter/material.dart';
import 'package:flutter_ahj_app/app/yhpc/YhpcViewModel.dart';
import 'package:flutter_ahj_app/base/basewidget/view/BaseWidget.dart';
import 'package:flutter_ahj_app/base/utils/JUIKit/JText.dart';
import 'package:flutter_ahj_app/base/utils/mTopBar.dart';
import 'package:flutter_ahj_app/base/values/SQColor.dart';
import 'package:flutter_ahj_app/base/values/dimens.dart';

class ChooseZglxView extends BaseStatefulWidget {
  @override
  State<StatefulWidget> initState() {
    // TODO: implement initState
    // throw UnimplementedError();
    return ChooseZglxViewState();
  }
}

class ChooseZglxViewState extends BaseState<YhpcViewModel, ChooseZglxView> {
  List _list = ['立即整改', '限期整改', '停产停业整顿'];

  @override
  void initState() {
    // TODO: implement initState
    super.initState();
  }

  @override
  Widget initWidget() {
    return Scaffold(
      backgroundColor: SQColor.white,
      appBar: MTopBar(
        elevation: 0,
        title: '选择整改类型',
      ).create(),
      body: _bodyView(),
    );
  }

  _bodyView() {
    return Container(
      margin: EdgeInsets.all(15),
      child: Container(
        child: SingleChildScrollView(
          child: ListView.builder(
              shrinkWrap: true,
              physics: NeverScrollableScrollPhysics(),
              itemCount: _list.length,
              itemBuilder: (context, index) {
                return InkWell(
                  onTap: () {
                    Navigator.pop(context, _list[index]);
                  },
                  child: Column(
                    children: [
                      Container(
                        padding: EdgeInsets.only(top: 15, bottom: 15),
                        child: Row(
                          children: [
                            Expanded(
                              child: JText(_list[index]),
                            ),
                            Icon(
                              Icons.arrow_forward_ios_outlined,
                              size: Dimens.dimens15,
                              color: SQColor.black_999999,
                            ),
                          ],
                        ),
                      ),
                      Container(
                        height: 1,
                        color: Color(0xfff6f6f6),
                        width: double.infinity,
                      ),
                    ],
                  ),
                );
              }),
        ),
      ),
    );
  }
}
